import os
import yaml


class ConfigReader(object):
    __path = None
    __data = dict()

    def __init__(self, path):
        assert os.path.isfile(path), "file {} does not exist".format(path)
        self.__path = path
        with open(path, 'r') as file:
            self.__data = yaml.load(file.read(), Loader=yaml.FullLoader)

    def getElement(self, name: str):
        if name is '':
            return None
        return self.__data[name]

